<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
    <meta charset="UTF-8">
    <title>智能报修系统——投诉管理</title>
    <link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>resources/css/rightDiv.css"/>
    <link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>resources/css/manager.css"/>
    <!--引入交互所需css-->
    <link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>resources/css/jNotify.jquery.css"/>
    <%--<script src="<%= request.getContextPath()%>resources/js/manager.js" type="text/javascript" charset="utf-8"></script>--%>
</head>
<body ng-app="managerApp">
<%System.out.println(basePath);%>
<!--头部开始-->
<div id="head">
    <div id="head_con">
        <p class="title">智能报修系统</p>
        <div class="phoneNum"  ng-controller="servicenumCtrl">
            服务电话：
            <span id="servicenum">
					{{servicephone}}
				</span>
        </div>
    </div>

</div>
<!--头部结束-->
<!--左边开始-->
<div id="staffLeft">
    <div id="staffLeftCon">
        <!--管理人员的信息-->
        <div id="staffInfo">
            <!--姓名-->
            <p class="staffName">admin</p>
            <!--客服学号-->
            <!--<p class="staffNum">1506111111</p>-->
            <!--职位-->
            <p class="place">管理人员</p>
        </div>


        <%--a 标签跳转后左边目录栏字体颜色设置 开始--%>

        <style>
            #operation a:link,a:visited,a:hover{
                text-decoration: none;
                color: #4e7500;
            }
        </style>
        <%--a 标签跳转后左边目录栏字体颜色设置 结束--%>

        <div id="operation">
            <ul>
                <a href="/complainli"><li id="complainli" class="active" >投诉管理 </li></a>
                <a href="/tiao1"><li id="createli"  >创建工单</li></a>
                <a href="/ordermanageli"><li id="ordermanageli">工单管理</li></a>
                <a href="/tiao2"> <li id="faultli" >故障分类管理</li></a>
                <a href="/totalorderli"><li id="totalorderli">工单统计报表</li></a>
                <a href="/yeji"><li id="performancesli">运维人员业绩</li></a>
                <a href="/worktypeli"><li id="worktypeli">运维人员管理</li></a>
                <a href="/guanli"><li id="websiteli">网站管理</li></a>
            </ul>
        </div>
    </div>
</div>
<!--左边结束-->
<!--右边开始-->
<div id="pushOrdersRight">
    <div id="pushOrdersRight_con">
        <%----%>
        <!--投诉管理开始-->
        <div id="complainMangement"  ng-controller="complainMangementCtrl">
            <div id="all">
                <ul>
                    <li id="unfinish" class="now" ng-click="unhandledComplaints()"><a href="#">未处理投诉</a></li>
                    <li id="finish" ng-click="handledComplaints()"><a href="#">已处理投诉</a></li>
                </ul>
            </div>
            <table id="alternatecolor" class="altrowstable">
                <thead>
                <tr>
                    <th>时间</th>
                    <th>工单号</th>
                    <th>故障种类</th>
                    <th>运维人员</th>
                    <th>投诉人联系方式</th> <!--已归档 处理中 未处理-->
                    <th>删除</th>
                    <th ng-show="unhandledComplaintListShow">归档</th>
                </tr>
                </thead>
                <tbody>
                <tr id="unhandledComplaintList" ng-repeat="complain in complains" ng-show="unhandledComplaintListShow">

                    <td>{{complain.uploadTime | newtime}}</td>
                    <td>{{complain.jobnumber}}</td>
                    <td>{{complain.one}}</td>
                    <td>{{complain.userName}}</td>
                    <td>{{complain.userPhone}}</td>
                    <td><input type="submit" value="删除"  ng-click="delete(complain)"/></td>
                    <td><input type="submit" value="归档"  ng-click="file(complain)" /></td>

                </tr>
                <tr id="handledComplaintList"  ng-repeat="complain in handcomplains"  ng-show="handledComplaintListShow">

                    <td>{{complain.uploadTime | newtime}}</td>
                    <td>{{complain.jobnumber}}</td>
                    <td>{{complain.one}}</td>
                    <td>{{complain.userName}}</td>
                    <td>{{complain.userPhone}}</td>
                    <td><input type="submit" value="删除"  ng-click="delete(complain)"/></td>


                </tr>
                </tbody>
            </table>
            <div class="turnpagediv1">
                <button class="prepage1">上一页</button>
                <p class="currentpage1">当前第1页</p>
                <button class="nextpage1">下一页</button>
            </div>
        </div>
        <%--<!--投诉管理结束-->--%>



        <%--角色分配  开始--%>
        <div id="operatorlist" class="turndiv" ng-controller="operlistCtrl">
            <button id="operlistadd" ng-click="addoperlist()">添加</button>
            <table id="operlisttable">
                <tr>
                    <th class="bold">工号</th>
                    <th  class="bold">姓名</th>
                    <th class="bold">操作</th>
                </tr>
                <tr>
                    <td>1111111</td>
                    <td>运维1</td>
                    <td><button class="operlistremove">移除</button></td>
                </tr>
            </table>

            <div id="operadddiv">
                工号：<br>
                <input type="text" id="writeopernum" placeholder="请输入工号"/>
                <br>
                <input class="addoperbtn" type="button" value="确认添加">
                <input class="canceladdoperbtn" type="button" value="取消" ng-click="canceladdoperbtn()"/>

            </div>
        </div>

    </div>
</div>
<!--右边结束-->
<div id="footer" class="footer">
    <p class="footerWord">版权所有&nbsp;四川旅游学院</p>
</div>
<!--引入交互所需文件-->
<script type="text/javascript" src="<%= request.getContextPath()%>resources/js/jquery-3.1.1.min.js"></script>
<script src="<%= request.getContextPath()%>resources/js/angular.min.js" type="text/javascript" charset="utf-8"></script>
<script src="<%= request.getContextPath()%>resources/js/managerController.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="<%= request.getContextPath()%>resources/js/jNotify.jquery.js"></script>
<script>
    //工单管理和投诉管理的已完成和未完成切换

    qiehuan("all");
//    qiehuan("all2");
    function qiehuan(id){
        var nowUl = document.getElementById(id);
        var nowLi = nowUl.getElementsByTagName("li");
        for(var i = 0; i < nowLi.length; i++) {
            nowLi[i].onclick = function() {
                for(var j = 0; j < nowLi.length; j++) {
                    nowLi[j].className = "";
                }
                this.className = "now";

            }

        }

    }
</script>
</body>
</html>
